
<%@page import="com.dts.project.model.GasModel"%>
<%@page import="com.dts.project.dao.GasDAO"%>
<%@page import="com.dts.core.util.CoreHash"%>
<%@page import="java.util.Enumeration"%><html xmlns="http://www.w3.org/1999/xhtml">
<!-- DW6 -->
<head>
<script language="JavaScript" src="scripts/gen_validatorv31.js" type="text/javascript"></script>
<script language="JavaScript" type="text/javascript" src="scripts/ts_picker.js"></script>
<script language="JavaScript1.1" src="scripts/pass.js">


</script> <script type="text/javascript" src="scripts/image.js"> </script>
 <script type="text/javascript" src="scripts/general.js"> </script>
 <script type="text/javascript" src="scripts/adi.js"> </script>
 <script type="text/javascript" src="scripts/form_validation.js"> </script>
<script type="text/javascript">

function SetChecked(ch) {
	if (document.f.ch[0].checked) {
		for (i = 0; i < document.f.ch.length; i++) {
			if (document.f.ch[i].name == ch) {
				document.f.ch[i].checked = true;
			}
		}
	} else {
		for (i = 0; i < document.f.ch.length; i++) {
			if (document.f.ch[i].name == ch) {
				document.f.ch[i].checked = false;
			}
		}
	}
}


</script>
<script language="JavaScript">
function checkAll()
{
   var checkboxex = document.getElementsByName("check");
   for(var i=0;i<checkboxex.length;i++)
   {
   	 	checkboxex[i].checked=document.getElementById("checkall").checked;
   }
}
 function validatePage()
 {
 	var choices = document.getElementsByName("check");
 	for(var i=0;i<choices.length;i++)
 	{
 		if(choices[i].checked)
 		{
 			return confirm("Do you want to really delete the Staff member?");
 		}
 	} 
 	alert("Select atleast one Detention for this action");
 	return false;
 }
 </script>
<!-- Copyright 2005 Macromedia, Inc. All rights reserved. -->
<title>Lodging - Home Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="css/mm_lodging1.css" type="text/css" />
<style type="text/css">
<!--
.style1 {color: #FFFFFF}
body {
	background-color: #FFFFFF;
}
-->
</style>
</head>
<body>
<table border="0" align="center" cellpadding="0" cellspacing="0">
	<tr>
	<td height="139" colspan="6" align="left" valign="top" nowrap="nowrap"><img src="images/mm_spacer.gif" alt="" width="15" height="1" border="0" /><br />
	  <table width="100%" border="0">
        <tr>
         <td><img src="images/pidhead.jpg" alt="ds" width="100%" height="139" /></td> </tr>
      </table></td>
	</tr>

	<tr bgcolor="#ffffff">
	<td colspan="6"><img src="images/mm_spacer.gif" alt="" width="1" height="1" border="0" /></td>
	</tr>

	 <tr bgcolor="#a4c2c2">	
	<td height="36" colspan="6" class="navText style1" id="navigation">	

	
	<% String role=(String)session.getAttribute("role"); 
	if(role!=null){
	if(role.equalsIgnoreCase("ADMINISTRATOR")){
	 %>
	<jsp:include page="AdminOptions.jsp"/>
	
	<%}else if(role.equalsIgnoreCase("customer")){ %>
	
	<jsp:include page="CustOptions.jsp"/>
		
	<%}else { %>
	
	<jsp:include page="GeneralOptions.html"/>		
	<%} }else{
					response.sendRedirect("LoginForm.jsp?status=session expired login again...." );
			}	
	 %>
	 
	 	</td>	
	</tr>	
  
  

	<tr bgcolor="#ffffff">
	<td colspan="6"><img src="images/mm_spacer.gif" alt="" width="1" height="1" border="0" /></td>
	</tr>

	<tr bgcolor="#ffffff">
	<td colspan="2" valign="top" bgcolor="#438464"><table border="0" cellspacing="0" cellpadding="0" width="230">
		<tr>
		<td width="15">&nbsp;</td>
		<td width="200" class="sidebarText" id="padding"><span class="style1"><br />
		</span><br />		</td>
		<td width="15">&nbsp;</td>
		</tr>
	</table>	</td>
	<td width="50" valign="top"><img src="images/mm_spacer.gif" alt="" width="50" height="1" border="0" /></td>
	<td width="529" valign="top"><br />
	<br />
	<table border="0" cellspacing="0" cellpadding="0" width="440">
		
		<tr>
		<td class="bodyText">
		
		 <form name="f" action="Accept.jsp" method="">    
		
            <br/> 
<table align="center" WIDTH="990" border="0" bordercolor="black" bgcolor="#F4F5F7">
      <th colspan="15" bgcolor="#3179c8"><center><b><font color="white"> Gas Requests From Customers </font></center></th>
      <tr rowspan="4"></tr>
          
       
        <tr><td><center>  <% if(request.getParameter("status")!=null)
					  {%>
                           <strong><font color=red><%=request.getParameter("status")%></font></strong>
                      <%}%></center></td></tr>
       
       
                
                <%
                String loginname=(String)session.getAttribute("user"); 
                  
  GasModel  umodel=null;

      try{
       
        String images=getServletContext().getRealPath("/images");
        
       CoreHash ch=new GasDAO().getAllGasCustomerReqToAdmin();
        Enumeration em=ch.elements();
        
         %> 
         
         
     <%
	        if(ch!=null && ch.size()>0)
		   {
		     		
        %>  
         
           <tr>
           <th><input type="checkbox" name="checkall" onclick="checkAll()"/></th>
    <td>Gas AccNo</td> 
    <td>Gas Type</td> 
    <td>Req Date</td>
    <td>Security No</td>    
   
     </tr>    
        <% while(em.hasMoreElements()){
             umodel=(GasModel)em.nextElement();
           session.setAttribute("getgasdetails",umodel);
         %> 
        <tr> 
         <td><input type="checkbox" name="check" value="<%=umodel.getGasaccno()%>"/></td>
        <td value="<%=umodel.getGasaccno() %>"> <%=umodel.getGasaccno() %></td>
        
        <td><%=umodel.getGastype() %></td>
        <td><%=umodel.getReqdate() %></td>
        <td><%=umodel.getSecurityno()%></td>  
<%--        <td><input type="submit" name="submit" value="Accept"/><input type="submit" name="submit" value="Reject"/></td><br>--%>
   <td><input type="submit" name="submit" value="Accept"/></td>
    </tr>
       <%} %> 
      </table>
       <%}}catch(Exception e){e.printStackTrace();} %>
</form> 
		<br />		</td>
		</tr>
	</table>	</td>
	<td width="108">&nbsp;</td>
	<td width="61">&nbsp;</td>
	</tr>

	<tr bgcolor="#ffffff">
	<td colspan="6">`</td>
	</tr>
    <tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr>
    <tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr>
    <tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr>
    <tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr>
    <tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr>
    <tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr>
    <tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr>
    <tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr>
    <tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr>
    <tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr>
    <tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr>
    <tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr>
    <tr></tr><tr></tr>
    
	<tr>
	<td height="20" colspan="6" bgcolor="#438464"><div align="right"><center><span class="style2 style1">&copy;All rights reserved </span></center></div></td>
	</tr>
</table>
</body>
</html>